package org.jupiter.blog.service.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.jupiter.blog.api.domain.JupiterRolePermission;

import java.util.List;

@Mapper
public interface JupiterRolePermissionMapper {

	int insert(JupiterRolePermission rolePermission);

	JupiterRolePermission selectByUuid(@Param("uuid") String uuid);

	List<JupiterRolePermission> selectAll();

	List<JupiterRolePermission> selectByRoleUuid(@Param("roleUuid") String roleId);

	List<JupiterRolePermission> selectByPermissionId(@Param("permissionId") String permissionId);

	int updateByUuidSelective(JupiterRolePermission rolePermission);

	int deleteByUuid(@Param("uuid") String uuid);

	int deleteByRoleUuid(@Param("roleUuid") String roleId);

	int deleteByPermissionId(@Param("permissionId") String permissionId);

	int insertBatch(@Param("list") List<JupiterRolePermission> rolePermissions);
}
